package com.ss.entity.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.ss.entity.SummerInstance;

/**
 *  审核实例状态。
 * @Author: 夏十七
 * @Date: 2019/7/24 21:46
 * @Version 1.0
 */
public enum SummerInstanceStatus {

    BACK(0,"退回编辑"),
    ONGOING(1,"进行中"),
    PASS(2,"通过"),
    FAIL(3,"未通过");

    SummerInstanceStatus(int id, String name){
        this.id = id;
        this.name = name;
    }

    @EnumValue
    private final int id;
    private final String name;

    public int getId() {
        return id;
    }

    public static SummerInstanceStatus valueOf(Integer id){
        SummerInstanceStatus[] values = SummerInstanceStatus.values();
        for (SummerInstanceStatus value : values) {
            if (id.equals(value.id)){
                return value;
            }
        }
        return null;
    }

}
